package requests

import (
	"app/common/params"

	"github.com/shopspring/decimal"
)

// 新建用户
type YwyCreateRequest struct {
	Username     string `gorm:"column:username;" json:"username" validate:"maxLen:30" label:"用户名" filter:"trim"` //用户名
	Phone        string `gorm:"column:phone;" json:"phone" validate:"cnMobile" label:"手机号" filter:"trim"`        //手机号
	Password     string `gorm:"column:password;" json:"password" validate:"maxLen:20|minLen:6|alphaDash" filter:"trim" label:"密码"`
	Sex          int8   `gorm:"column:sex" json:"sex"`                     //1男 2女 3未知
	Pid          int64  `gorm:"column:pid" json:"pid" validate:"required"` //省份ID
	Cid          int64  `gorm:"column:cid" json:"cid" validate:"required"` //城市ID
	Aid          int64  `gorm:"column:aid" json:"aid" validate:"required"` //区县ID
	IsUseAccount int8   `gorm:"column:is_use_account" json:"isUseAccount"` //是否可使用系统做单会员  1是 2否
}

type CheckTbLoginRequest struct {
	LgToken string `json:"lgToken" form:"lgToken" validate:"required" label:"lgToken"`
}

type IsfgRequest struct {
	ShopId    string `json:"shopId" form:"shopId" validate:"required"`       //店铺ID
	EPlatform int8   `json:"ePlatform" form:"ePlatform" validate:"required"` //电商平台类型 1淘宝 2抖音 3京东 4瓶多多
	Account   string `json:"nick" form:"account" validate:"required" label:"account"`
}

type GetTaskRequest struct {
	TaskId int64  `json:"taskId" form:"taskId" validate:"required" label:"任务id"`
	Nick   string `json:"nick" form:"nick" validate:"required" label:"nick"`
}

type DoTaskRequest struct {
	TaskId   int64           `json:"taskId" form:"taskId" validate:"required" label:"任务id"`
	TaskInfo string          `json:"taskInfo" form:"taskInfo" validate:"required" label:"提交数据 json"`
	Nick     string          `json:"nick" form:"nick" validate:"required" label:"淘宝昵称"`
	RealPay  decimal.Decimal `json:"realPay" form:"realPay" validate:"required" label:"支付金额"` //实际支付金额
}

type YwyListRequest struct {
	params.ParamsPagination
	Username string `form:"username"` //昵称
	Phone    string `form:"phone"`    //手机号
	Id       int64  `form:"id"`       //编号
}

type YwyTokenRequest struct {
	Id int64 `json:"id" form:"id" validate:"required" label:"业务员ID"`
}

type YwyEditRequest struct {
	Id           int64  `json:"id" form:"id" validate:"required" label:"ID"`
	Username     string `json:"username"`                                  //用户名
	Phone        string `json:"phone"`                                     //手机号
	Sex          int8   `json:"sex"`                                       // 1男 2女 3未知
	State        int8   `json:"state"`                                     //1 正常 2禁用 3注销
	IsUseAccount int8   `gorm:"column:is_use_account" json:"isUseAccount"` //是否可使用系统做单会员  1是 2否
}
